﻿namespace SDT.Libraries.Mapper
{
    /// <summary>
    /// Written & reviewed by SinhNT.
    /// Base class for mapping between two items.
    /// </summary>
    public class MapItemBase<TName,TValue> : IMapItem<TName,TValue>
    {
        protected TName _name = default(TName);
        protected TValue _val = default(TValue);

        protected MapItemBase(TName name, TValue value)
        {
            this._name = name;
            this._val = value;
        }

        #region IMapItem<TName,TValue> Members

        public TName Name
        {
            get
            {
                return _name;
            }
            set
            {
                _name = value;
            }
        }

        public TValue Value
        {
            get
            {
                return _val;
            }
            set
            {
                _val = value;
            }
        }

        #endregion
    }
}